﻿/// <reference path="./jquery-1.8.2.min.js" />
/// <reference path="./selfish.js" />
/// <reference path="./fourkill.util.js" />
/// <reference path="./fourkill.painters.js" />

var MistObject = GameObject.extend({
    initialize: function initialize(distance, percentange) {
        GameObject.initialize.call(this);
        this.locationRelativeToCamera.distance = distance;
        this.percentage = percentange;
        this.color = "rgba(240, 240, 240, 0.09)";
    },
    updateLocation: function updateLocation() { },
    getPainter: function getPainter() { return Painters.Mist; }
});

var TreeObject = GameObject.extend({
    initialize: function initialize(treeType) {
        GameObject.initialize.call(this);
        this.treeType = treeType == null ? "FourTriangleTree" : treeType;
        this.color = "rgb(0, " + util.random(60, 128) + ", " + util.random(0, 60) + ")";
    },
    getPainter: function getPainter() { return Painters.FourTriangleTree; }
});

var MapMarkerObject = GameObject.extend({
    initialize: function initialize(locationName, color) {
        GameObject.initialize.call(this);
        this.name = locationName;
        this.textColor = "#000";
        this.color = color == null ? "#00FF00" : color;
    },
    getPainter: function getPainter() { return Painters.MapMarker; }
});

var CloudObject = GameObject.extend({
    initialize: function initialize(treeType) {
        GameObject.initialize.call(this);
        var c = 255 - util.random(0, 20);
        this.color = "rgba(" + c + ", " + c + ", " + c + ", " + (Math.random() * 0.44 + 0.48) + ")";
    },
    tick: function tick() {
        if (this.speed != 0) this.move(this.speed);
    },
    getPainter: function getPainter() { return Painters.Cloud; }
});